package com.briup.test.dao;

import com.briup.test.bean.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {
    @Select("select * from user where name like '%${name}%'")
    List<User> query(String name);

    @Insert("insert into user values (null,#{name},#{age},#{gender})")
    void insert(User user);

    @Update("update user set name=#{name},age=#{age},gender=#{gender} where id=#{id}")
    void update(User user);
}
